home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-I386 / CURRENT.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  300b  |  16 lines

  1. #ifndef _I386_CURRENT_H
  2. #define _I386_CURRENT_H
  3.  
  4. struct task_struct;
  5.  
  6. static inline struct task_struct * get_current(void)
  7. {
  8.     struct task_struct *current;
  9.     __asm__("andl %%esp,%0; ":"=r" (current) : "0" (~8191UL));
  10.     return current;
  11.  }
  12.  
  13. #define current get_current()
  14.  
  15. #endif /* !(_I386_CURRENT_H) */
  16.